Skip to content

Rebase to v2.50.0-rc1 #5655

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 397 commits into from
Jun 4, 2025

Conversation

dscho
Copy link
Member

@dscho dscho commented Jun 3, 2025

Range-diff relative to -rc0
  • 2: 0721be1 = 1: 40b7a72 sideband: mask control characters

  • 3: 2a0d918 = 2: 1c05864 sideband: introduce an "escape hatch" to allow control characters

  • 4: e80404c = 3: 9195c74 sideband: do allow ANSI color sequences by default

  • 1: 58ee5a5 = 4: 2d2323b unix-socket: avoid leak when initialization fails

  • 5: 79c05f5 = 5: 61fb61a grep: prevent ^$ false match at end of file

  • 6: a871a6a = 6: d12b781 t9350: point out that refs are not updated correctly

  • 7: 87413fd = 7: 3ec1456 transport-helper: add trailing --

  • 8: 80c38bd = 8: a2729e4 mingw: avoid relative #includes

  • 9: e47dd6a = 9: 101f7d5 remote-helper: check helper status after import/export

  • 11: 7fd6d84 = 10: c6b83a8 mingw: order #includes alphabetically

  • 12: b596669 = 11: 19fcb0e Always auto-gc after calling a fast-import transport

  • 16: 77af8c7 = 12: b27a1ea mingw: include the Python parts in the build

  • 119: d7af027 = 13: 51d88a3 win32/pthread: avoid name clashes with winpthread

  • 120: 23f6017 = 14: a8f0f51 git-compat-util: avoid redeclaring _DEFAULT_SOURCE

  • 121: ddae2dc = 15: f9312d5 Import the source code of mimalloc v2.2.3

  • 122: 05fa7cd = 16: b8901ec mimalloc: adjust for building inside Git

  • 123: bb3bbc5 = 17: 61820a2 mimalloc: offer a build-time option to enable it

  • 10: 9846466 = 18: 4b52107 mingw: demonstrate a problem with certain absolute paths

  • 14: e9f471a = 19: 66d5d62 clean: do not traverse mount points

  • 124: 7cb513d = 20: ee381de mingw: use mimalloc

  • 13: 0ce7229 = 21: d616573 mingw: allow absolute paths without drive prefix

  • 15: 9c841e9 = 22: 10a64a1 clean: remove mount points when possible

  • 20: 7585f02 = 23: 95fac2d mingw: ensure valid CTYPE

  • 21: 4705ee4 = 24: 5aa094c mingw: demonstrate a git add issue with NTFS junctions

  • 23: ea41b52 = 25: 029c956 mingw: allow git.exe to be used instead of the "Git wrapper"

  • 24: 0198fc8 = 26: 71a7ec3 strbuf_realpath(): use platform-dependent API if available

  • 26: 974bd10 = 27: 91fd222 mingw: ignore HOMEDRIVE/HOMEPATH if it points to Windows' system directory

  • 27: 75367ed = 28: b7b3179 http: use new "best effort" strategy for Secure Channel revoke checking

  • 17: 84bbe94 = 29: a24c865 transport: optionally disable side-band-64k

  • 18: 88788c4 = 30: cfc83db mingw: do resolve symlinks in getcwd()

  • 19: 671b006 = 31: 56bc53c mingw: fix fatal error working on mapped network drives on Windows

  • 28: 13d6126 = 32: 5298532 clink.pl: fix MSVC compile script to handle libcurl-d.lib

  • 29: be6f6d1 = 33: 4b8a81c mingw: implement a platform-specific strbuf_realpath()

  • 22: a6e72cc = 34: eaefde7 t5505/t5516: allow running without .git/branches/ in the templates

  • 25: 5273c48 = 35: bc01ae4 t5505/t5516: fix white-space around redirectors

  • 33: c816465 = 36: d924bbe clink.pl: fix libexpatd.lib link error when using MSVC

  • 30: eefd7bb = 37: 711ee30 t3701: verify that we can add lots of files interactively

  • 31: 08ac143 = 38: 263ccb8 git add -i: handle CR/LF line endings in the interactive input

  • 32: 8af7847 = 39: ca205fb commit: accept "scissors" with CR/LF line endings

  • 42: 38c79cb = 40: 6c953f9 t0014: fix indentation

  • 43: 0487294 = 41: f04756b git-gui: accommodate for intent-to-add files

  • 37: 0cf3816 = 42: 217831e vcpkg_install: detect lack of Git

  • 39: 300047f = 43: e501b8a vcpkg_install: add comment regarding slow network connections

  • 41: 6fb0b9c = 44: e5fd024 vcbuild: install ARM64 dependencies when building ARM64 binaries

  • 34: 02d5d6d = 45: da8685e Makefile: clean up .ilk files when MSVC=1

  • 45: 5c9c15c = 46: 0057836 vcbuild: add an option to install individual 'features'

  • 35: 5086855 = 47: 645fa10 vcbuild: add support for compiling Windows resource files

  • 46: 4296de4 = 48: c8b88ea cmake: allow building for Windows/ARM64

  • 36: 92ab07d = 49: 0326293 config.mak.uname: add git.rc to MSVC builds

  • 47: d22159c = 50: 4308805 ci(vs-build) also build Windows/ARM64 artifacts

  • 38: d2d571a = 51: 5b31441 clink.pl: ignore no-stack-protector arg on MSVC=1 builds

  • 48: ac67513 = 52: d494aae Add schannel to curl installation

  • 40: fae37ed = 53: 5b30759 clink.pl: move default linker options for MSVC=1 builds

  • 49: 77d17e6 = 54: b4c1325 cmake(): allow setting HOST_CPU for cross-compilation

  • 44: d317ff2 = 55: 99b4411 cmake: install headless-git.

  • 59: 2c837c1 = 56: 25aeac6 hash-object: demonstrate a >4GB/LLP64 problem

  • 50: 5615678 = 57: cd7668b CMake: default Visual Studio generator has changed

  • 60: c4cb651 = 58: 95c930b object-file.c: use size_t for header lengths

  • 51: 753fe16 = 59: 8a37e9d .gitignore: add Visual Studio CMakeSetting.json file

  • 61: 473425d = 60: 1e9db04 hash algorithms: use size_t for section lengths

  • 52: cec4527 = 61: 71cf6ca subtree: update contrib/subtree test target

  • 53: 969e8e4 = 62: ccd65d4 CMakeLists: add default "x64-windows" arch for Visual Studio

  • 62: a149b07 = 63: c239ba0 hash-object --stdin: verify that it works with >4GB/LLP64

  • 54: 416a8f1 = 64: 26b3de1 mingw: allow for longer paths in parse_interpreter()

  • 55: f835b13 = 65: 0afb4b4 compat/vcbuild: document preferred way to build in Visual Studio

  • 56: b1af939 = 66: e1a8987 http: optionally send SSL client certificate

  • 57: 422e1a7 = 67: f60c057 ci: run contrib/subtree tests in CI builds

  • 58: 2e373db = 68: 432355d CMake: show Win32 and Generator_platform build-option values

  • 65: aa0b0ce = 69: 1149d53 init: do parse all core.* settings early

  • 63: b7e9e07 = 70: ef900aa hash-object: add another >4GB/LLP64 test case

  • 64: 66e984a = 71: c4e71bb setup: properly use "%(prefix)/" when in WSL

  • 70: 5b81277 = 72: 8eaef44 Add config option windows.appendAtomically

  • 71: 2aa523e = 73: 8d12eab MinGW: link as terminal server aware

  • 66: a6b8d72 = 74: 1d022ea hash-object: add a >4GB/LLP64 test case using filtered input

  • 67: d780fdb = 75: 39d87a8 compat/mingw.c: do not warn when failing to get owner

  • 68: ac8e9e1 = 76: bd31250 mingw: $env:TERM="xterm-256color" for newer OSes

  • 69: 97b8d07 = 77: 84ae8e9 winansi: check result and Buffer before using Name

  • 72: 486e68c = 78: facac87 mingw: change core.fsyncObjectFiles = 1 by default

  • 73: 8af6262 = 79: a73fa66 Fix Windows version resources

  • 77: b55a4cd = 80: b40b1d8 status: fix for old-style submodules with commondir

  • 74: 3491a9a = 81: ec0cd76 http: optionally load libcurl lazily

  • 75: 0d53de4 = 82: 0653184 http: support lazy-loading libcurl also on Windows

  • 76: 20871ad = 83: 9c7b2e0 http: when loading libcurl lazily, allow for multiple SSL backends

  • 125: 4f455ac = 84: e69b8b5 windows: skip linking git-<command> for built-ins

  • 78: 614f222 = 85: dbe6980 windows: fix Repository>Explore Working Copy

  • 79: 0171ece = 86: cbb91fb mingw: do load libcurl dynamically by default

  • 80: 7494874 = 87: ce991ce Add a GitHub workflow to verify that Git/Scalar work in Nano Server

  • 81: 8871e62 = 88: 212e946 mingw: suggest windows.appendAtomically in more cases

  • 82: a2cf688 = 89: 8bc6dbe win32: use native ANSI sequence processing, if possible

  • 83: b14d4e9 = 90: 722c1b6 git.rc: include winuser.h

  • 90: a7ee846 = 91: f58a926 common-main.c: fflush stdout buffer upon exit

  • 91: 6ab3a4b = 92: a0cf8bc t5601/t7406(mingw): do run tests with symlink support

  • 92: 199e2c6 = 93: 2039c57 win32: ensure that localtime_r() is declared even in i686 builds

  • 84: 9e359ca = 94: 0cc4fd0 ci: work around a problem with HTTP/2 vs libcurl v8.10.0

  • 85: 326f4cf = 95: 578840a revision: create mark_trees_uninteresting_dense()

  • 86: 4405032 = 96: a01a7d1 pack-objects: extract should_attempt_deltas()

  • 87: 9f404b2 = 97: 26d98e9 pack-objects: add --path-walk option

  • 88: cb45441 = 98: 3246aa9 pack-objects: introduce GIT_TEST_PACK_PATH_WALK

  • 89: 9c5a844 = 99: 845797f repack: add --path-walk option

  • 95: 6a43772 = 100: 15f290b pack-objects: enable --path-walk via config

  • 93: fb7dcfd = 101: 1904c8b Fallback to AppData if XDG_CONFIG_HOME is unset

  • 94: 1bf627e = 102: 097e770 run-command: be helpful with Git LFS fails on Windows 7

  • 96: 7cff060 = 103: cee2d14 scalar: enable path-walk during push via config

  • 97: efb57b8 = 104: ad567f3 pack-objects: refactor path-walk delta phase

  • 98: 9e0f3d7 = 105: 9c3f548 pack-objects: thread the path-based compression

  • 99: 5ba7e55 = 106: 46662ea survey: stub in new experimental 'git-survey' command

  • 100: 0f73d6f = 107: 2b4ad11 survey: add command line opts to select references

  • 101: 5997703 = 108: bf0b2c3 survey: start pretty printing data in table form

  • 102: e04a6b1 = 109: 1749e4d survey: add object count summary

  • 103: 3cecf57 = 110: 2773ccb survey: summarize total sizes by object type

  • 104: e2dea9d = 111: 60fdd4b survey: show progress during object walk

  • 109: 93cc211 = 112: acadf50 mingw: make sure errno is set correctly when socket operations fail

  • 105: 49c79bb = 113: a3509d2 survey: add ability to track prioritized lists

  • 110: 97f6dfa = 114: 0bea82c compat/mingw: handle WSA errors in strerror

  • 106: 1eb8efe = 115: ddf29d2 survey: add report of "largest" paths

  • 111: a79b9a2 = 116: 7d4fe9b compat/mingw: drop outdated comment

  • 107: e760937 = 117: 0c7d1c5 survey: add --top= option and config

  • 113: 90f3172 = 118: 4c96ef2 t0301: actually test credential-cache on Windows

  • 108: 6197bf3 = 119: 9e3ee33 survey: clearly note the experimental nature in the output

  • 112: 7b60042 = 120: d333b01 mingw_open_existing: handle directories better

  • 114: 9af1b53 = 121: 05b64cb mingw: drop Windows 7-specific work-around

  • 115: 30a05cd = 122: 465a3ea credential-cache: handle ECONNREFUSED gracefully

  • 116: d26d1a2 = 123: d0265b7 mingw_rename: support ReFS on Windows 2022

  • 117: bf510be = 124: a0e654f max_tree_depth: lower it for clangarm64 on Windows

  • 118: 2c945a0 = 125: c8b30f3 reftable: do make sure to use custom allocators

  • 236: bb56068 = 126: 3ddd87a check-whitespace: avoid alerts about upstream commits

  • 126: bbf5752 = 127: 26cce2d git-gui: provide question helper for retry fallback on Windows

  • 127: 19709d8 = 128: 1914172 git gui: set GIT_ASKPASS=git-gui--askpass if not set yet

  • 128: 72c5917 = 129: 4e5c950 git-gui--askyesno: fix funny text wrapping

  • 129: 0c3c5d5 = 130: 2d032e5 git-gui--askyesno: allow overriding the window title

  • 130: 8af7d04 = 131: 136a522 git-gui--askyesno (mingw): use Git for Windows' icon, if available

  • 131: 115fe4c = 132: a9dcdcc Win32: make FILETIME conversion functions public

  • 132: a116037 = 133: 7d8b781 Win32: dirent.c: Move opendir down

  • 133: c524fa9 = 134: b3b1a69 mingw: make the dirent implementation pluggable

  • 134: 9c9c0c7 = 135: 2ede2e9 Win32: make the lstat implementation pluggable

  • 135: 7b83ca6 = 136: 7385ae3 mingw: add infrastructure for read-only file system level caches

  • 136: 72495fd = 137: adf7094 mingw: add a cache below mingw's lstat and dirent implementations

  • 137: f5d59fe = 138: 272745b fscache: load directories only once

  • 138: 2ff9082 = 139: 649d0cd fscache: add key for GIT_TRACE_FSCACHE

  • 139: a6edbb4 = 140: 31e5a52 fscache: remember not-found directories

  • 140: 7d31c1f = 141: 5e3be13 fscache: add a test for the dir-not-found optimization

  • 141: 41a3b54 = 142: c239a34 add: use preload-index and fscache for performance

  • 142: f3d0f9f = 143: 38741f8 dir.c: make add_excludes aware of fscache during status

  • 143: 27f6a08 = 144: cb660ed fscache: make fscache_enabled() public

  • 144: 8d8c8ca = 145: a7347b4 dir.c: regression fix for add_excludes with fscache

  • 145: 2417b5c = 146: eea15ef fetch-pack.c: enable fscache for stats under .git/objects

  • 146: f9e3c90 = 147: 60d2112 checkout.c: enable fscache for checkout again

  • 147: 91d4e79 = 148: 3fd471e Enable the filesystem cache (fscache) in refresh_index().

  • 148: 754fc1f = 149: 8d391ba fscache: use FindFirstFileExW to avoid retrieving the short name

  • 149: d36b8e5 = 150: 079e4e1 fscache: add GIT_TEST_FSCACHE support

  • 150: 5ef383f = 151: d2fcf71 fscache: add fscache hit statistics

  • 151: cca436b = 152: 312522d unpack-trees: enable fscache for sparse-checkout

  • 152: 4ad8364 = 153: 8ec3253 status: disable and free fscache at the end of the status command

  • 153: 857203a = 154: 16813eb mem_pool: add GIT_TRACE_MEMPOOL support

  • 154: 99be04f = 155: 2bdad05 fscache: fscache takes an initial size

  • 155: dfb094c = 156: d24a7b5 fscache: update fscache to be thread specific instead of global

  • 156: 200fb08 = 157: 8e86a5c fscache: teach fscache to use mempool

  • 157: 384eb45 = 158: 6ad5a4f fscache: make fscache_enable() thread safe

  • 158: c764908 = 159: 1e58253 fscache: teach fscache to use NtQueryDirectoryFile

  • 159: 7470e7f = 160: 7b6849d fscache: remember the reparse tag for each entry

  • 160: a98d9d5 = 161: 9a9d0dc fscache: implement an FSCache-aware is_mount_point()

  • 161: 56bbdda = 162: f6f65dc clean: make use of FSCache

  • 162: bdc5034 = 163: 41e7b4b pack-objects (mingw): demonstrate a segmentation fault with large deltas

  • 163: 82d15f5 = 164: 0b015d9 mingw: support long paths

  • 164: be0e669 = 165: 7b6deb6 Win32: fix 'lstat("dir/")' with long paths

  • 165: 5b2344d = 166: a63e512 win32(long path support): leave drive-less absolute paths intact

  • 166: b8f77e5 = 167: ba6c04a compat/fsmonitor/fsm-*-win32: support long paths

  • 167: 7f15c0e = 168: 4780290 clean: suggest using core.longPaths if paths are too long to remove

  • 168: 867cfb7 = 169: a6f8a39 mingw: Support git_terminal_prompt with more terminals

  • 169: f0a881e = 170: 0b4d8e2 compat/terminal.c: only use the Windows console if bash 'read -r' fails

  • 170: 10c2314 = 171: 1cd55e4 mingw (git_terminal_prompt): do fall back to CONIN$/CONOUT$ method

  • 171: 8239a06 = 172: 48c84a0 strbuf_readlink: don't call readlink twice if hint is the exact link size

  • 172: c57e4c7 = 173: 2df2e82 strbuf_readlink: support link targets that exceed PATH_MAX

  • 173: c780074 = 174: 9f7e78e lockfile.c: use is_dir_sep() instead of hardcoded '/' checks

  • 174: f6c159f = 175: c86d667 Win32: don't call GetFileAttributes twice in mingw_lstat()

  • 175: 0afaa59 = 176: e721421 Win32: implement stat() with symlink support

  • 176: d082966 = 177: 0b7ee0c Win32: remove separate do_lstat() function

  • 177: 0910036 = 178: 04fde20 Win32: let mingw_lstat() error early upon problems with reparse points

  • 178: 37236dc = 179: 4c7e6a1 mingw: teach fscache and dirent about symlinks

  • 179: 3db00c3 = 180: 363ab11 Win32: lstat(): return adequate stat.st_size for symlinks

  • 180: f1a468e = 181: 190451b Win32: factor out retry logic

  • 181: 36a2928 = 182: e7b6ee4 Win32: change default of 'core.symlinks' to false

  • 182: d1d724f = 183: 249347d Win32: add symlink-specific error codes

  • 183: d28ef41 = 184: ec7a8a7 Win32: mingw_unlink: support symlinks to directories

  • 184: 90897f2 = 185: c318843 Win32: mingw_rename: support renaming symlinks

  • 185: 4cf3c02 = 186: f88a3d2 Win32: mingw_chdir: change to symlink-resolved directory

  • 186: 095d2a9 = 187: ba00e4a Win32: implement readlink()

  • 187: 1a46971 = 188: 657af5f mingw: lstat: compute correct size for symlinks

  • 188: d0ccbca = 189: 55227de Win32: implement basic symlink() functionality (file symlinks only)

  • 189: 837bbf9 = 190: a4d3841 Win32: symlink: add support for symlinks to directories

  • 190: 8a28196 = 191: 6fc690d mingw: try to create symlinks without elevated permissions

  • 191: 30d2452 = 192: 7940803 mingw: emulate stat() a little more faithfully

  • 192: 18f3eaf = 193: bb36858 mingw: special-case index entries for symlinks with buggy size

  • 196: c90e66e = 194: 882331d Win32: symlink: move phantom symlink creation to a separate function

  • 198: eac6057 = 195: 2ac053a Introduce helper to create symlinks that knows about index_state

  • 193: 67b468d = 196: 6c51221 mingw: introduce code to detect whether we're inside a Windows container

  • 200: 34d9962 = 197: 21874db mingw: allow to specify the symlink type in .gitattributes

  • 194: b62c056 = 198: 4c574ee mingw: when running in a Windows container, try to rename() harder

  • 201: fa0f66c = 199: 3806230 Win32: symlink: add test for symlink attribute

  • 195: 3d00410 = 200: 736e406 mingw: move the file_attr_to_st_mode() function definition

  • 202: 90748ec = 201: 9ccfb07 mingw: explicitly specify with which cmd to prefix the cmdline

  • 197: d53b40e = 202: 8495182 mingw: Windows Docker volumes are not symbolic links

  • 203: d343ea0 = 203: 3713e1b mingw: when path_lookup() failed, try BusyBox

  • 199: 553ada6 = 204: ef31bcf mingw: work around rename() failing on a read-only file

  • 204: b47b4e5 = 205: 3e4400f test-tool: learn to act as a drop-in replacement for iconv

  • 205: 80fa281 = 206: f99dbcd tests(mingw): if iconv is unavailable, use test-helper --iconv

  • 206: 9ccdf5b = 207: 1824307 gitattributes: mark .png files as binary

  • 207: 4cc0414 = 208: 777c8cf tests: move test PNGs into t/lib-diff/

  • 208: 761c830 = 209: 4def7f7 tests: only override sort & find if there are usable ones in /usr/bin/

  • 209: 00aa0ad = 210: 86c5c54 tests: use the correct path separator with BusyBox

  • 210: a1cf023 = 211: 84c709a mingw: only use Bash-ism builtin pwd -W when available

  • 211: 796666f = 212: 8cd24d3 tests (mingw): remove Bash-specific pwd option

  • 212: e6ea7e9 = 213: 3dad2f7 test-lib: add BUSYBOX prerequisite

  • 213: da895d2 = 214: 6428689 t5003: use binary file from t/lib-diff/

  • 214: 613a9c8 = 215: fc4af1f t5532: workaround for BusyBox on Windows

  • 215: 0d9278d = 216: 56ae74b t5605: special-case hardlink test for BusyBox-w32

  • 216: 6e20848 = 217: 4ae69ab t5813: allow for $PWD to be a Windows path

  • 217: 53740fd = 218: 3afe2df t9200: skip tests when $PWD contains a colon

  • 218: d046fea = 219: 4658c1e mingw: add a Makefile target to copy test artifacts

  • 220: 85717b9 = 220: 088ff47 mingw: kill child processes in a gentler way

  • 221: f5de583 = 221: 33e922d mingw: do not call xutftowcs_path in mingw_mktemp

  • 219: a2bd79a = 222: 5961162 mingw: optionally enable wsl compability file mode bits

  • 222: 6807980 = 223: 6b4057b mingw: really handle SIGINT

  • 223: aa991fb = 224: aa0f3f9 Partially un-revert "editor: save and reset terminal after calling EDITOR"

  • 225: 1a6e6ac = 225: 3b85add Describe Git for Windows' architecture [no ci]

  • 226: fd9be8c = 226: d85de55 Modify the Code of Conduct for Git for Windows

  • 227: 84d959b = 227: f34f3e8 CONTRIBUTING.md: add guide for first-time contributors

  • 228: 325ed2a = 228: 9aee88f README.md: Add a Windows-specific preamble

  • 229: 5f676a8 = 229: 25145bd Add an issue template

  • 230: 673c3c6 ! 230: 2aa8aca Add a GitHub workflow to monitor component updates

    @@ .github/workflows/monitor-components.yml (new)
     +            title-pattern: ^libgcrypt-[0-9\.]*$
     +          - label: gpg
     +            feed: https://github.com/gpg/gnupg/releases.atom
    ++            # As per https://gnupg.org/download/index.html#sec-1-1, the stable
    ++            # versions are the one with an even minor version number.
    ++            title-pattern: ^gnupg-\d+\.\d*[02468]\.
     +          - label: mintty
     +            feed: https://github.com/mintty/mintty/releases.atom
     +          - label: 7-zip
  • 231: 6fb5f13 = 231: 32d639c Modify the GitHub Pull Request template (to reflect Git for Windows)

  • 224: b2ccaf7 = 232: da2498e reset: reinstate support for the deprecated --stdin option

  • 232: 66761fd = 233: af976c0 fsmonitor: reintroduce core.useBuiltinFSMonitor

  • 233: c77cff5 = 234: 6bf56e7 dependabot: help keeping GitHub Actions versions up to date

  • 234: ca7fd2d = 235: 852fedb SECURITY.md: document Git for Windows' policies

  • 235: 5a96bd1 < -: ------------ fixup! Add a GitHub workflow to monitor component updates

Note: We need to wait for cURL v8.14.1 (thanks @pszlazak for the heads-up!)

This resolves #5654.

rkitover and others added 30 commits June 3, 2025 18:55
For Windows builds >= 15063 set $env:TERM to "xterm-256color" instead of
"cygwin" because they have a more capable console system that supports
this. Also set $env:COLORTERM="truecolor" if unset.

$env:TERM is initialized so that ANSI colors in color.c work, see
29a3963 (Win32: patch Windows environment on startup, 2012-01-15).

See git-for-windows#3629 regarding problems caused by always setting
$env:TERM="cygwin".

This is the same heuristic used by the Cygwin runtime.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
NtQueryObject under Wine can return a success but fill out no name.
In those situations, Wine will set Buffer to NULL, and set result to
the sizeof(OBJECT_NAME_INFORMATION).

Running a command such as

echo "$(git.exe --version 2>/dev/null)"

will crash due to a NULL pointer dereference when the code attempts to
null terminate the buffer, although, weirdly, removing the subshell or
redirecting stdout to a file will not trigger the crash.

Code has been added to also check Buffer and Length to ensure the check
is as robust as possible due to the current behavior being fragile at
best, and could potentially change in the future

This code is based on the behavior of NtQueryObject under wine and
reactos.

Signed-off-by: Christopher Degawa <ccom@randomderp.com>
Atomic append on windows is only supported on local disk files, and it may
cause errors in other situations, e.g. network file system. If that is the
case, this config option should be used to turn atomic append off.

Co-Authored-By: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: 孙卓识 <sunzhuoshi@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
From the documentation of said setting:

	This boolean will enable fsync() when writing object files.

	This is a total waste of time and effort on a filesystem that
	orders data writes properly, but can be useful for filesystems
	that do not use journalling (traditional UNIX filesystems) or
	that only journal metadata and not file contents (OS X’s HFS+,
	or Linux ext3 with "data=writeback").

The most common file system on Windows (NTFS) does not guarantee that
order, therefore a sudden loss of power (or any other event causing an
unclean shutdown) would cause corrupt files (i.e. files filled with
NULs). Therefore we need to change the default.

Note that the documentation makes it sound as if this causes really bad
performance. In reality, writing loose objects is something that is done
only rarely, and only a handful of files at a time.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Whith Windows 2000, Microsoft introduced a flag to the PE header to mark executables as
"terminal server aware". Windows terminal servers provide a redirected Windows directory and
redirected registry hives when launching legacy applications without this flag set. Since we
do not use any INI files in the Windows directory and don't write to the registry, we don't
need  this additional preparation. Telling the OS that we don't need this should provide
slightly improved startup times in terminal server environments.

When building for supported Windows Versions with MSVC the /TSAWARE linker flag is
automatically set, but MinGW requires us to set the --tsaware flag manually.

This partially addresses git-for-windows#3935.

Signed-off-by: Matthias Aßhauer <mha1993@live.de>
Add FileVersion, which is a required field
As not all required fields were present, none were being included
Fixes git-for-windows#4090

Signed-off-by: Kiel Hurley <kielhurley@gmail.com>
In f9b7573 (repository: free fields before overwriting them,
2017-09-05), Git was taught to release memory before overwriting it, but
357a03e (repository.c: move env-related setup code back to
environment.c, 2018-03-03) changed the code so that it would not
_always_ be overwritten.

As a consequence, the `commondir` attribute would point to
already-free()d memory.

This seems not to cause problems in core Git, but there are add-on
patches in Git for Windows where the `commondir` attribute is
subsequently used and causing invalid memory accesses e.g. in setups
containing old-style submodules (i.e. the ones with a `.git` directory
within theirs worktrees) that have `commondir` configured.

This fixes git-for-windows#4083.

Signed-off-by: Andrey Zabavnikov <zabavnikov@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This compile-time option allows to ask Git to load libcurl dynamically
at runtime.

Together with a follow-up patch that optionally overrides the file name
depending on the `http.sslBackend` setting, this kicks open the door for
installing multiple libcurl flavors side by side, and load the one
corresponding to the (runtime-)configured SSL/TLS backend.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This implements the Windows-specific support code, because everything is
slightly different on Windows, even loading shared libraries.

Note: I specifically do _not_ use the code from
`compat/win32/lazyload.h` here because that code is optimized for
loading individual functions from various system DLLs, while we
specifically want to load _many_ functions from _one_ DLL here, and
distinctly not a system DLL (we expect libcurl to be located outside
`C:\Windows\system32`, something `INIT_PROC_ADDR` refuses to work with).
Also, the `curl_easy_getinfo()`/`curl_easy_setopt()` functions are
declared as vararg functions, which `lazyload.h` cannot handle. Finally,
we are about to optionally override the exact file name that is to be
loaded, which is a goal contrary to `lazyload.h`'s design.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The previous commits introduced a compile-time option to load libcurl
lazily, but it uses the hard-coded name "libcurl-4.dll" (or equivalent
on platforms other than Windows).

To allow for installing multiple libcurl flavors side by side, where
each supports one specific SSL/TLS backend, let's first look whether
`libcurl-<backend>-4.dll` exists, and only use `libcurl-4.dll` as a fall
back.

That will allow us to ship with a libcurl by default that only supports
the Secure Channel backend for the `https://` protocol. This libcurl
won't suffer from any dependency problem when upgrading OpenSSL to a new
major version (which will change the DLL name, and hence break every
program and library that depends on it).

This is crucial because Git for Windows relies on libcurl to keep
working when building and deploying a new OpenSSL package because that
library is used by `git fetch` and `git clone`.

Note that this feature is by no means specific to Windows. On Ubuntu,
for example, a `git` built using `LAZY_LOAD_LIBCURL` will use
`libcurl.so.4` for `http.sslbackend=openssl` and `libcurl-gnutls.so.4`
for `http.sslbackend=gnutls`.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
It is merely a historical wart that, say, `git-commit` exists in the
`libexec/git-core/` directory, a tribute to the original idea to let Git
be essentially a bunch of Unix shell scripts revolving around very few
"plumbing" (AKA low-level) commands.

Git has evolved a lot from there. These days, most of Git's
functionality is contained within the `git` executable, in the form of
"built-in" commands.

To accommodate for scripts that use the "dashed" form of Git commands,
even today, Git provides hard-links that make the `git` executable
available as, say, `git-commit`, just in case that an old script has not
been updated to invoke `git commit`.

Those hard-links do not come cheap: they take about half a minute for
every build of Git on Windows, they are mistaken for taking up huge
amounts of space by some Windows Explorer versions that do not
understand hard-links, and therefore many a "bug" report had to be
addressed.

The "dashed form" has been officially deprecated in Git version 1.5.4,
which was released on February 2nd, 2008, i.e. a very long time ago.
This deprecation was never finalized by skipping these hard-links, but
we can start the process now, in Git for Windows.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Since Git v2.39.1, we are a bit more stringent in searching the PATH. In
particular, we specifically require the `.exe` suffix.

However, the `Repository>Explore Working Copy` command asks for
`explorer.exe` to be found on the `PATH`, which _already_ has that
suffix.

Let's unstartle the PATH-finding logic about this scenario.

This fixes git-for-windows#4356

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This will help with Git for Windows' maintenance going forward: It
allows Git for Windows to switch its primary libcurl to a variant
without the OpenSSL backend, while still loading an alternate when
setting `http.sslBackend = openssl`.

This is necessary to avoid maintenance headaches with upgrading OpenSSL:
its major version name is encoded in the shared library's file name and
hence major version updates (temporarily) break libraries that are
linked against the OpenSSL library.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In Git for Windows v2.39.0, we fixed a regression where `git.exe` would
no longer work in Windows Nano Server (frequently used in Docker
containers).

This GitHub workflow can be used to verify manually that the Git/Scalar
executables work in Nano Server.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
When running Git for Windows on a remote APFS filesystem, it would
appear that the `mingw_open_append()`/`write()` combination would fail
almost exactly like on some CIFS-mounted shares as had been reported in
git-for-windows#2753, albeit with a
different `errno` value.

Let's handle that `errno` value just the same, by suggesting to set
`windows.appendAtomically=false`.

Signed-off-by: David Lomas <dl3@pale-eds.co.uk>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Windows 10 version 1511 (also known as Anniversary Update), according to
https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences
introduced native support for ANSI sequence processing. This allows
using colors from the entire 24-bit color range.

All we need to do is test whether the console's "virtual processing
support" can be enabled. If it can, we do not even need to start the
`console_thread` to handle ANSI sequences.

Or, almost all we need to do: When `console_thread()` does its work, it
uses the Unicode-aware `write_console()` function to write to the Win32
Console, which supports Git for Windows' implicit convention that all
text that is written is encoded in UTF-8. The same is not necessarily
true if native ANSI sequence processing is used, as the output is then
subject to the current code page. Let's ensure that the code page is set
to `CP_UTF8` as long as Git writes to it.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
winuser.h contains the definition of RT_MANIFEST that our LLVM based
toolchain needs to understand that we want to embed
compat/win32/git.manifest as an application manifest. It currently just
embeds it as additional data that Windows doesn't understand.

This also helps our GCC based toolchain understand that we only want one
copy embedded. It currently embeds one working assembly manifest and one
nearly identical, but useless copy as additional data.

This also teaches our Visual Studio based buildsystems to pick up the
manifest file from git.rc. This means we don't have to explicitly specify
it in contrib/buildsystems/Generators/Vcxproj.pm anymore. Slightly
counter-intuitively this also means we have to explicitly tell Cmake
not to embed a default manifest.

This fixes git-for-windows#4707

Signed-off-by: Matthias Aßhauer <mha1993@live.de>
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
By default, the buffer type of Windows' `stdout` is unbuffered (_IONBF),
and there is no need to manually fflush `stdout`.

But some programs, such as the Windows Filtering Platform driver
provided by the security software, may change the buffer type of
`stdout` to full buffering. This nees `fflush(stdout)` to be called
manually, otherwise there will be no output to `stdout`.

Signed-off-by: MinarKotonoha <chengzhuo5@qq.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
A long time ago, we decided to run tests in Git for Windows' SDK with
the default `winsymlinks` mode: copying instead of linking. This is
still the default mode of MSYS2 to this day.

However, this is not how most users run Git for Windows: As the majority
of Git for Windows' users seem to be on Windows 10 and newer, likely
having enabled Developer Mode (which allows creating symbolic links
without administrator privileges), they will run with symlink support
enabled.

This is the reason why it is crucial to get the fixes for CVE-2024-? to
the users, and also why it is crucial to ensure that the test suite
exercises the related test cases. This commit ensures the latter.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The `__MINGW64__` constant is defined, surprise, surprise, only when
building for a 64-bit CPU architecture.

Therefore using it as a guard to define `_POSIX_C_SOURCE` (so that
`localtime_r()` is declared, among other functions) is not enough, we
also need to check `__MINGW32__`.

Technically, the latter constant is defined even for 64-bit builds. But
let's make things a bit easier to understand by testing for both
constants.

Making it so fixes this compile warning (turned error in GCC v14.1):

  archive-zip.c: In function 'dos_time':
  archive-zip.c:612:9: error: implicit declaration of function 'localtime_r';
  did you mean 'localtime_s'? [-Wimplicit-function-declaration]
    612 |         localtime_r(&time, &tm);
        |         ^~~~~~~~~~~
        |         localtime_s

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The sparse tree walk algorithm was created in d5d2e93 (revision:
implement sparse algorithm, 2019-01-16) and involves using the
mark_trees_uninteresting_sparse() method. This method takes a repository
and an oidset of tree IDs, some of which have the UNINTERESTING flag and
some of which do not.

Create a method that has an equivalent set of preconditions but uses a
"dense" walk (recursively visits all reachable trees, as long as they
have not previously been marked UNINTERESTING). This is an important
difference from mark_tree_uninteresting(), which short-circuits if the
given tree has the UNINTERESTING flag.

A use of this method will be added in a later change, with a condition
set whether the sparse or dense approach should be used.

Signed-off-by: Derrick Stolee <stolee@gmail.com>
This will be helpful in a future change.

Signed-off-by: Derrick Stolee <stolee@gmail.com>
In order to more easily compute delta bases among objects that appear at the
exact same path, add a --path-walk option to 'git pack-objects'.

This option will use the path-walk API instead of the object walk given by
the revision machinery. Since objects will be provided in batches
representing a common path, those objects can be tested for delta bases
immediately instead of waiting for a sort of the full object list by
name-hash. This has multiple benefits, including avoiding collisions by
name-hash.

The objects marked as UNINTERESTING are included in these batches, so we
are guaranteeing some locality to find good delta bases.

After the individual passes are done on a per-path basis, the default
name-hash is used to find other opportunistic delta bases that did not
match exactly by the full path name.

RFC TODO: It is important to note that this option is inherently
incompatible with using a bitmap index. This walk probably also does not
work with other advanced features, such as delta islands.

Getting ahead of myself, this option compares well with --full-name-hash
when the packfile is large enough, but also performs at least as well as
the default in all cases that I've seen.

RFC TODO: this should probably be recording the batch locations to another
list so they could be processed in a second phase using threads.

RFC TODO: list some examples of how this outperforms previous pack-objects
strategies. (This is coming in later commits that include performance
test changes.)

Signed-off-by: Derrick Stolee <stolee@gmail.com>
There are many tests that validate whether 'git pack-objects' works as
expected. Instead of duplicating these tests, add a new test environment
variable, GIT_TEST_PACK_PATH_WALK, that implies --path-walk by default
when specified.

This was useful in testing the implementation of the --path-walk
implementation, especially in conjunction with test such as:

 - t0411-clone-from-partial.sh : One test fetches from a repo that does
   not have the boundary objects. This causes the path-based walk to
   fail. Disable the variable for this test.

 - t5306-pack-nobase.sh : Similar to t0411, one test fetches from a repo
   without a boundary object.

 - t5310-pack-bitmaps.sh : One test compares the case when packing with
   bitmaps to the case when packing without them. Since we disable the
   test variable when writing bitmaps, this causes a difference in the
   object list (the --path-walk option adds an extra object). Specify
   --no-path-walk in both processes for the comparison. Another test
   checks for a specific delta base, but when computing dynamically
   without using bitmaps, the base object it too small to be considered
   in the delta calculations so no base is used.

 - t5316-pack-delta-depth.sh : This script cares about certain delta
   choices and their chain lengths. The --path-walk option changes how
   these chains are selected, and thus changes the results of this test.

 - t5322-pack-objects-sparse.sh : This demonstrates the effectiveness of
   the --sparse option and how it combines with --path-walk.

 - t5332-multi-pack-reuse.sh : This test verifies that the preferred
   pack is used for delta reuse when possible. The --path-walk option is
   not currently aware of the preferred pack at all, so finds a
   different delta base.

 - t7406-submodule-update.sh : When using the variable, the --depth
   option collides with the --path-walk feature, resulting in a warning
   message. Disable the variable so this warning does not appear.

I want to call out one specific test change that is only temporary:

 - t5530-upload-pack-error.sh : One test cares specifically about an
   "unable to read" error message. Since the current implementation
   performs delta calculations within the path-walk API callback, a
   different "unable to get size" error message appears. When this
   is changed in a future refactoring, this test change can be reverted.

Signed-off-by: Derrick Stolee <stolee@gmail.com>
Since 'git pack-objects' supports a --path-walk option, allow passing it
through in 'git repack'. This presents interesting testing opportunities for
comparing the different repacking strategies against each other.

Add the --path-walk option to the performance tests in p5313.

For the microsoft/fluentui repo [1] checked out at a specific commit [2],
the results are very interesting:

Test                                           this tree
------------------------------------------------------------------
5313.2: thin pack                              0.40(0.47+0.04)
5313.3: thin pack size                                    1.2M
5313.4: thin pack with --full-name-hash        0.09(0.10+0.04)
5313.5: thin pack size with --full-name-hash             22.8K
5313.6: thin pack with --path-walk             0.08(0.06+0.02)
5313.7: thin pack size with --path-walk                  20.8K
5313.8: big pack                               2.16(8.43+0.23)
5313.9: big pack size                                    17.7M
5313.10: big pack with --full-name-hash        1.42(3.06+0.21)
5313.11: big pack size with --full-name-hash             18.0M
5313.12: big pack with --path-walk             2.21(8.39+0.24)
5313.13: big pack size with --path-walk                  17.8M
5313.14: repack                                98.05(662.37+2.64)
5313.15: repack size                                    449.1K
5313.16: repack with --full-name-hash          33.95(129.44+2.63)
5313.17: repack size with --full-name-hash              182.9K
5313.18: repack with --path-walk               106.21(121.58+0.82)
5313.19: repack size with --path-walk                   159.6K

[1] https://github.com/microsoft/fluentui
[2] e70848ebac1cd720875bccaa3026f4a9ed700e08

This repo suffers from having a lot of paths that collide in the name
hash, so examining them in groups by path leads to better deltas. Also,
in this case, the single-threaded implementation is competitive with the
full repack. This is saving time diffing files that have significant
differences from each other.

A similar, but private, repo has even more extremes in the thin packs:

Test                                           this tree
--------------------------------------------------------------
5313.2: thin pack                              2.39(2.91+0.10)
5313.3: thin pack size                                    4.5M
5313.4: thin pack with --full-name-hash        0.29(0.47+0.12)
5313.5: thin pack size with --full-name-hash             15.5K
5313.6: thin pack with --path-walk             0.35(0.31+0.04)
5313.7: thin pack size with --path-walk                  14.2K

Notice, however, that while the --full-name-hash version is working
quite well in these cases for the thin pack, it does poorly for some
other standard cases, such as this test on the Linux kernel repository:

Test                                           this tree
--------------------------------------------------------------
5313.2: thin pack                              0.01(0.00+0.00)
5313.3: thin pack size                                     310
5313.4: thin pack with --full-name-hash        0.00(0.00+0.00)
5313.5: thin pack size with --full-name-hash              1.4K
5313.6: thin pack with --path-walk             0.00(0.00+0.00)
5313.7: thin pack size with --path-walk                    310

Here, the --full-name-hash option does much worse than the default name
hash, but the path-walk option does exactly as well.

Signed-off-by: Derrick Stolee <stolee@gmail.com>
Users may want to enable the --path-walk option for 'git pack-objects' by
default, especially underneath commands like 'git push' or 'git repack'.

This should be limited to client repositories, since the --path-walk option
disables bitmap walks, so would be bad to include in Git servers when
serving fetches and clones. There is potential that it may be helpful to
consider when repacking the repository, to take advantage of improved deltas
across historical versions of the same files.

Much like how "pack.useSparse" was introduced and included in
"feature.experimental" before being enabled by default, use the repository
settings infrastructure to make the new "pack.usePathWalk" config enabled by
"feature.experimental" and "feature.manyFiles".

Signed-off-by: Derrick Stolee <stolee@gmail.com>
In order to be a better Windows citizenship, Git should
save its configuration files on AppData folder. This can
enables git configuration files be replicated between machines
using the same Microsoft account logon which would reduce the
friction of setting up Git on new systems. Therefore, if
%APPDATA%\Git\config exists, we use it; otherwise
$HOME/.config/git/config is used.

Signed-off-by: Ariel Lourenco <ariellourenco@users.noreply.github.com>
Git LFS is now built with Go 1.21 which no longer supports Windows 7.
However, Git for Windows still wants to support Windows 7.

Ideally, Git LFS would re-introduce Windows 7 support until Git for
Windows drops support for Windows 7, but that's not going to happen:
git-for-windows#4996 (comment)

The next best thing we can do is to let the users know what is
happening, and how to get out of their fix, at least.

This is not quite as easy as it would first seem because programs
compiled with Go 1.21 or newer will simply throw an exception and fail
with an Access Violation on Windows 7.

The only way I found to address this is to replicate the logic from Go's
very own `version` command (which can determine the Go version with
which a given executable was built) to detect the situation, and in that
case offer a helpful error message.

This addresses git-for-windows#4996.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
As reported in https://lore.kernel.org/git/ZuPKvYP9ZZ2mhb4m@pks.im/,
libcurl v8.10.0 had a regression that was picked up by Git's t5559.30
"large fetch-pack requests can be sent using chunked encoding".

This bug was fixed in libcurl v8.10.1.

Sadly, the macos-13 runner image was updated in the brief window between
these two libcurl versions, breaking each and every CI build, as
reported at git-for-windows#5159.

This would usually not matter, we would just ignore the failing CI
builds until the macos-13 runner image is rebuilt in a couple of days,
and then the CI builds would succeed again.

However.

As has become the custom, a surprise Git version was released, and now
that Git for Windows wants to follow suit, since Git for Windows has
this custom of trying to never release a version with a failing CI
build, we _must_ work around it.

This patch implements this work-around, basically for the sake of Git
for Windows v2.46.2's CI build.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Start work on a new 'git survey' command to scan the repository
for monorepo performance and scaling problems.  The goal is to
measure the various known "dimensions of scale" and serve as a
foundation for adding additional measurements as we learn more
about Git monorepo scaling problems.

The initial goal is to complement the scanning and analysis performed
by the GO-based 'git-sizer' (https://github.com/github/git-sizer) tool.
It is hoped that by creating a builtin command, we may be able to take
advantage of internal Git data structures and code that is not
accessible from GO to gain further insight into potential scaling
problems.

Co-authored-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Jeff Hostetler <git@jeffhostetler.com>
Signed-off-by: Derrick Stolee <stolee@gmail.com>
dscho and others added 8 commits June 3, 2025 19:06
This patch introduces support to set special NTFS attributes that are
interpreted by the Windows Subsystem for Linux as file mode bits, UID
and GID.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Handle Ctrl+C in Git Bash nicely

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
A fix for calling `vim` in Windows Terminal caused a regression and was
reverted. We partially un-revert this, to get the fix again.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This topic branch re-adds the deprecated --stdin/-z options to `git
reset`. Those patches were overridden by a different set of options in
the upstream Git project before we could propose `--stdin`.

We offered this in MinGit to applications that wanted a safer way to
pass lots of pathspecs to Git, and these applications will need to be
adjusted.

Instead of `--stdin`, `--pathspec-from-file=-` should be used, and
instead of `-z`, `--pathspec-file-nul`.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Originally introduced as `core.useBuiltinFSMonitor` in Git for Windows
and developed, improved and stabilized there, the built-in FSMonitor
only made it into upstream Git (after unnecessarily long hemming and
hawing and throwing overly perfectionist style review sticks into the
spokes) as `core.fsmonitor = true`.

In Git for Windows, with this topic branch, we re-introduce the
now-obsolete config setting, with warnings suggesting to existing users
how to switch to the new config setting, with the intention to
ultimately drop the patch at some stage.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
…updates

Start monitoring updates of Git for Windows' component in the open
Add a README.md for GitHub goodness.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho dscho requested review from mjcheetham and rimrul June 3, 2025 20:56
@dscho dscho self-assigned this Jun 3, 2025
@dscho dscho added this to the v2.50.0 milestone Jun 3, 2025
@pszlazak
Copy link

pszlazak commented Jun 4, 2025

@dscho curl 8.14.1 has been released:
https://github.com/curl/curl/releases/tag/curl-8_14_1

@dscho
Copy link
Member Author

dscho commented Jun 4, 2025

Yes, and it's deployed to Git for Windows' SDKs already :-)

dscho added 3 commits June 4, 2025 15:19
To make `MIMALLOC_SHOW_STATS` work (setting this environment variable
will print out statistics about the allocations in the process just
before it terminates), we need to use mimalloc's "Fiber" based process
termination handling that was introduced in aa881733 (reorganize
primitives for process initialization; use special data segment on
Windows for thread termination by default on Windows now (issue git-for-windows#869),
2024-10-21): It requires UCRT which we do not use in Git for Windows'
GCC-based builds.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In commit cfe73e9d (wip: merging from upstream, 2024-12-25), mimalloc
introduced a bug where memory is retained excessively.

This leads to a problem e.g. when fetching Git for Windows' `main`
branch using the i686 variant of Git for Windows because it simply runs
out of address space.

Fix this as suggested in
microsoft/mimalloc#1025 (comment)

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
When `NO_SYMLINK_HEAD` is defined, `create_ref_symlink()` is hard-coded
as `(-1)`, and as a consequence the condition `!create_ref_symlink()`
always evaluates to false, rendering any code guarded by that condition
unreachable.

Therefore, clang is _technically_ correct when it complains about
unreachable code. It does completely miss the fact that this is okay
because on _other_ platforms, where `NO_SYMLINK_HEAD` is not defined,
the code isn't unreachable at all.

Let's use the same trick as in 82e79c6 (git-compat-util: add
NOT_CONSTANT macro and use it in atfork_prepare(), 2025-03-17) to
appease clang while at the same time keeping the `-Wunreachable` flag
to potentially find _actually_ unreachable code.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho
Copy link
Member Author

dscho commented Jun 4, 2025

Phew! That was a bit of work. The mimalloc upgrade caused git-sdk-32's git-artifacts workflow to fail while fetching git-for-windows/git's main branch, and clang newly complains in git-sdk-arm64's ci-artifacts workflow about "unreachable code" (narrator's voice: yes, it is unreachable here, but have you heard about cross-platform code, clang?).

@dscho
Copy link
Member Author

dscho commented Jun 4, 2025

Oh joy. Now osx-gcc starts complaining about cURL invocations:

  In file included from http.h:8,
                   from imap-send.c:36:
  In function 'setup_curl',
      inlined from 'curl_append_msgs_to_imap' at imap-send.c:1460:9,
      inlined from 'cmd_main' at imap-send.c:1581:9:
  /usr/local/Cellar/curl/8.14.0/include/curl/typecheck-gcc.h:50:15: error: call to '_curl_easy_setopt_err_long' declared with attribute warning: curl_easy_setopt expects a long argument [-Werror=attribute-warning]
     50 |               _curl_easy_setopt_err_long();                             \
        |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /usr/local/Cellar/curl/8.14.0/include/curl/curl.h:54:7: note: in definition of macro 'CURL_IGNORE_DEPRECATION'
     54 |       statements \
        |       ^~~~~~~~~~
  imap-send.c:1423:9: note: in expansion of macro 'curl_easy_setopt'
   1423 |         curl_easy_setopt(curl, CURLOPT_PORT, srvc->port);
        |         ^~~~~~~~~~~~~~~~
  /usr/local/Cellar/curl/8.14.0/include/curl/typecheck-gcc.h:50:15: error: call to '_curl_easy_setopt_err_long' declared with attribute warning: curl_easy_setopt expects a long argument [-Werror=attribute-warning]
     50 |               _curl_easy_setopt_err_long();                             \
        |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /usr/local/Cellar/curl/8.14.0/include/curl/curl.h:54:7: note: in definition of macro 'CURL_IGNORE_DEPRECATION'
     54 |       statements \
        |       ^~~~~~~~~~
  imap-send.c:1436:9: note: in expansion of macro 'curl_easy_setopt'
   1436 |         curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, srvc->ssl_verify);
        |         ^~~~~~~~~~~~~~~~
[...]

Repeat after me: `int` is not the same as `long`.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho dscho force-pushed the rebase-to-v2.50.0-rc1 branch from f6b0f0c to 6792aa8 Compare June 4, 2025 15:25
@dscho dscho requested a review from derrickstolee June 4, 2025 17:23
@dscho
Copy link
Member Author

dscho commented Jun 4, 2025

/git-artifacts

The tag-git workflow run was started

The git-artifacts-x86_64 workflow run was started.
The git-artifacts-i686 workflow run was started.
The git-artifacts-aarch64 workflow run was started.

Copy link

Validate the installer manually

The installer was built successfully;
Please download, install, and run through the pre-flight check-list.
@dscho ☝️

@dscho
Copy link
Member Author

dscho commented Jun 4, 2025

/release

The release-git workflow run was started

Copy link

@dscho, please Share on Bluesky and send the announcement email.

@gitforwindowshelper gitforwindowshelper bot merged commit 6792aa8 into git-for-windows:main Jun 4, 2025
192 of 195 checks passed
@dscho dscho deleted the rebase-to-v2.50.0-rc1 branch June 4, 2025 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[New git version] v2.50.0-rc1